% Running example of grid upsampling, with samples from "Tensor" 
%-----------------------------------------------------------------
% NIr Sharon, 22-05-12
%-----------------------------------------------------------------
M=15; % data length
grid = squeeze(Tensor(1:50,1:50,5,:,:));
% Random data :
% grid = zeros(M,M,3,3);
% for i=1:M
%     for j=1:M
%         a = rand(3);
%         a = a*a';
%         grid(i,j,:,:) = a;
%     end
% end
[Fgrid, Bgrid] = Matrix_Bivariate_4point( grid , 1/16, 1 );
ellipse_tensors(grid,.5);
figure(2);
ellipse_tensors(Fgrid,.5);
figure(3);
ellipse_tensors(Bgrid,.5);
title('With Boundary Case');
